package com.jay.aop.service.impl;

import com.jay.aop.exception.MinimumAccountException;
import com.jay.aop.model.Account;
import com.jay.aop.service.AccountService;
import org.apache.log4j.Logger;
import org.springframework.aop.framework.AopContext;

public class AccountServiceImpl implements AccountService {
    private static  final Logger LOGGER = Logger.getLogger(AccountServiceImpl.class);
    @Override
    public boolean doAccountTransaction(Account source, Account dest, int amount) throws MinimumAccountException {
        ((AccountService)(AopContext.currentProxy())).doAccountTransaction(source,dest,amount);
        return true;
    }
}
